﻿using System.ComponentModel;
using StockholmsStad.Windows.UI.Interfaces;

namespace StockholmsStad.Windows.UI.Models
{
    public class ShellPresentationModel : INotifyPropertyChanged, IShellPresentationModel
    {
        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        #endregion

        #region IShellPresentationModel Members

        /// <summary>
        /// If PropertyChange event is subscribed to then raise event
        /// </summary>
        /// <param name="propertyName"></param>
        private void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }

        private string _shellTitle;
        public string ShellTitle
        {
            get { return _shellTitle; }
            set
            {
                _shellTitle = value;
                OnPropertyChanged("ShellTitle");
            }
        }

        #endregion
    }
}
